"""day18 URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import re_path
from crm.views import department, auth

urlpatterns = [
    re_path(r'^login/$', auth.Auth.as_view(), name='login'),
    re_path(r'^logout/$', auth.Logout.as_view(), name='logout'),
    re_path(r'^index/$', auth.Index.as_view(), name='index'),

    # 部门信息
    re_path(r'^department_list/$', department.Department_list.as_view(), name='department_list'),
    re_path(r'^department_add/$', department.Department_add.as_view(), name='department_add'),
    re_path(r'^department_edit/(\d+)/$', department.Department_edit.as_view(), name='department_edit'),
    re_path(r'^department_del/(\d+)/$', department.Department_del.as_view(), name='department_del'),
]
